/*
 * ControlNode.java
 * Created on August 10, 2008, 1:06 AM by Uru
 *
 * A Control Node, contains data on what to do when a particular input is recieved
 */

package MenuSystem;

import java.util.*;

public class ControlNode {
    Hashtable<String,KeyDef> keys;  //contains the keys and what to do with them
    GameMenuItem cursor;            //contains the cursor to display
    
    //Creates a new instance of ControlNode
    public ControlNode(GameMenuItem mi){
        keys = new Hashtable<String,KeyDef>();
        cursor = mi;
    }
    
    //add a new key to this node
    public void addKeyDef(String s, KeyDef k){
        keys.put(s,k);
    }
    
    //get an existing key's definition
    public KeyDef getKeyDef(String s){
        return keys.get(s);
    }
}
